package org.neuedu.chapter09_0630.demo03;

import java.util.Random;
import java.util.UUID;

public class MathDemo02 {
    public static void main(String[] args) {
        // 随机数工具类
        Random r = new Random();
        double random = r.nextDouble();// [0,1)
        System.out.println(random);
        int i = r.nextInt(35)+1;// [1,36)
        System.out.println(i);

        // 生成随机数 UUID 32位随机16进制数
        UUID uuid = UUID.randomUUID();
        System.out.println(uuid.toString());
    }
}
